<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>约束浮动元素的位置</title>
    <style>
        /* 浮动元素经常和标准流父级搭配使用 */
        .box {
            width: 1000px;
            height: 445px;
            background-color: pink;
            margin: 0 auto;
        }

        .left {
            width: 500px;
            height: 445px;
            background-color: blue;
            float: left;
        }

        .right {
            width: 500px;
            height: 445px;
            background-color: red;
            float: left;

        }
    </style>
</head>

<body>
    <div class="box">
        <div class="left">1</div>
        <div class="right">2</div>
    </div>
</body>

</html>